import { serviceCreate } from '../utils/request'
import { merge } from 'axios/lib/utils'
const http = serviceCreate({
  // baseURL: '/dv',
  // 表单提交
  emulateJSON: true
})
// @config {headers, emulateJSON, loading, msg, errMsg, disableInterceptor}
const methods = {
    // 获取标签基本信息
    getInfo (params, config) {
        params = merge({
            tag_id: ''
        }, params || {})
        return http.get('/tag/getInfo', merge(config, { params }))
    },
    // 获取相关标签
    getRelated (params, config) {
        params =  merge({
            tag_id: ''
        }, params ||　{})
        return http.get('/tag/getSimilar', merge(config, { params }))
    },
    // 获取相关视频
    getVideos (params, config) {
        params = merge({
            tid: '',
            pn: 1,
            ps: 20
        }, params ||　{})
        return http.get('/tag/getVideos', merge(config, { params }))
    }
}

export default methods
